<table class="easyui-datagrid" id="deleteCollegeList" data-options="url:'uni/colleges',fit:true,toolbar:deleteCollegeListToolbar">
	<thead>
		<tr>
			<th data-options="field:'ck',checkbox:true"></th>
		    <th data-options="field:'lqyxsm',align:'center'">系编码</th>
		    <th data-options="field:'lqyxsmc',halign:'center'">系名称</th>
		</tr>
	</thead>
</table>

<script>
var deleteCollegeListToolbar = [{
	text:'删除',
    iconCls:'icon-remove',
    handler:function() {
    	var lqyxsm = $.map($('#deleteCollegeList').datagrid('getChecked'),function(row){return row.lqyxsm;}).join(',');
    	if(!lqyxsm) {$.messager.alert('提示','请至少选择一个系！');return;}
		$.messager.confirm('提示','确认要删除所选学院么？',function(r){
			if(!r) return;
			$.ajax({url:'uni/collegeAct',
				data:{action:'del',collegeId:lqyxsm},
				success:function(result) {
					if(result.errorInfo != 'none') {$.messager.alter('提示',result.errorInfo);return;}
					$.messager.alert('提示','删除系成功！');
					$('#deleteCollegeList').datagrid('reload');
				}
			});
				
		});
    }
}];
</script>